[TOC]

Operator Precedences

An operator with higher precedence will be performed first. For operators with same precedences, the one appears on the left will be performed first. For examples,

⚠️ The precedence table below is different from that in MATLAB's website. For compatibility, parentheses should always be used to explicitly specific the order of operations.

PrecedenceOperatorSymbol
1Parentheses()
2Transpose.'
2Conjugate Transpose'
3Unary plus+
3Unary minus-
4Logical NOT~ or !
5Power.^
5Matrix power^
6Multiplications.* or *
6Divisions./, .\, / or \
7Addition+
7Subtraction-
8Colon:
9Relation operators<, <=, >, >=, ==, ~= or !=
10Logical AND& or &&
11Logical OR| or ||